package com.k12.common.config;
import com.k12.common.listen.K12ApplicationListener;
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.TimeZone;

@Configuration
public class K12CommonAtuoConfiguration {

    @Bean
    public K12ApplicationListener k12ApplicationListener() {
        return new K12ApplicationListener();
    }

    @Bean
    public Jackson2ObjectMapperBuilderCustomizer customizer() {
        return builder -> {
            builder.simpleDateFormat("yyyy-MM-dd HH:mm:ss");
            builder.timeZone(TimeZone.getTimeZone("GMT+8"));
        };
    }


}
